<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/template/common/header.jsp"%>
<script type="text/javascript">
	$(function() {
		$("#cagegory-list-box").loadUrl("${base}/category!list.action", {
			"category.id" : "${empty category.id?'root':category.id}"
		}, function() {
			$("#cagegory-list-box").find("[layoutH]").layoutH();
		});
	});
</script>
<style type="text/css">
ul.rightTools {
	float: right;
	display: block;
}

ul.rightTools li {
	float: left;
	display: block;
	margin-left: 5px
}
</style>

<div class="pageContent" style="padding: 5px">
	<div class="tabs">
		<div class="tabsHeader">
			<div class="tabsHeaderContent">
				<ul>
					<li><a href="javascript:;"><span>分类管理</span> </a></li>
				</ul>
			</div>
		</div>
		<div class="tabsContent">
			<div>
				<div layoutH="55"
					style="float: left; display: block; overflow: auto; width: 350px; border: solid 1px #CCC; line-height: 21px; background: #fff">
					<c:if test="${empty category.id }">
						<ul class="tree treeFolder collapse">
							<cy:tree href="${base}/category!list.action?category.id={0}"
								items="${categories }" theme="tree" target="ajax"
								rel="cagegory-list-box" />
						</ul>
					</c:if>
					<c:if test="${not empty category.id }">
						<cy:tree href="${base}/category!list.action?category.id={0}"
							items="${categories }" theme="simple" target="ajax"
							rel="cagegory-list-box" />
					</c:if>
				</div>
				<div id="cagegory-list-box" class="unitBox"
					style="margin-left: 246px;"></div>

			</div>
		</div>
		<div class="tabsFooter">
			<div class="tabsFooterContent"></div>
		</div>
	</div>
</div>
